﻿using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace Koala.Pro.Core.Models
{
    [SugarTable("T_ACL_Function")]
    public class FunctionInfo : Entity<string>
    {
        public virtual string PID { get; set; }

        [Required]
        public virtual string Name { get; set; }

        [Required]
        public virtual string ControlID { get; set; }

        [Required]
        public virtual string SystemType_ID { get; set; }

        public virtual string SortCode { get; set; }

        [SugarColumn(IsIgnore = true)]
        public List<FunctionInfo> Children { get; set; } = new List<FunctionInfo>();

        public FunctionInfo()
        {
            PID = "-1";
        }
    }
}
